<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"></meta>
<title>Insert title here</title>
<script type="text/javascript" src="jquery/jquery-3.2.1.min.js"></script>

<script th:inline="javascript">  
    /*<![CDATA[*/  
     $(function(){  
        var msg = [[${msg}]];  
        if(msg!="null"&&msg!=null&&msg!=""){
    		alert(msg);
    	}
        
        
     }); 
    /*]]>*/  
  </script>



</head>
<body>
	<h1>Login HTML</h1>
	<h4 th:text="${msg}"></h4>

	<form action="login.action" method="post">
		用户名：<input type="text" name="username" /><br /> 密码：<input
			type="password" name="password" /><br /> <input type="submit"
			value="Submit" />
	</form>
</body>
</html>